class NewData {
  int? code;
  String? msg;
  int? total;
  List<Data>? data;

  NewData({this.code, this.msg, this.total, this.data});

  NewData.fromJson(Map<String, dynamic> json) {
    if (json["code"] is int) {
      code = json["code"];
    }
    if (json["msg"] is String) {
      msg = json["msg"];
    }
    if (json["total"] is int) {
      total = json["total"];
    }
    if (json["data"] is List) {
      data = json["data"] == null
          ? null
          : (json["data"] as List).map((e) => Data.fromJson(e)).toList();
    }
  }

  get newsImgUrl => null;

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["code"] = code;
    _data["msg"] = msg;
    _data["total"] = total;
    if (data != null) {
      _data["data"] = data?.map((e) => e.toJson()).toList();
    }
    return _data;
  }
}

class Data {
  int? id;
  String? newsTitle;
  String? sketch;
  String? releaseDate;
  int? release;
  String? transferredFrom;
  int? pageViewNum;
  String? newsImgUrl;
  int? isTop;
  String? typeCode;
  String? area;

  Data(
      {this.id,
      this.newsTitle,
      this.sketch,
      this.releaseDate,
      this.release,
      this.transferredFrom,
      this.pageViewNum,
      this.newsImgUrl,
      this.isTop,
      this.typeCode,
      this.area});

  Data.fromJson(Map<String, dynamic> json) {
    if (json["ID"] is int) {
      id = json["ID"];
    }
    if (json["NewsTitle"] is String) {
      newsTitle = json["NewsTitle"];
    }
    if (json["Sketch"] is String) {
      sketch = json["Sketch"];
    }
    if (json["ReleaseDate"] is String) {
      releaseDate = json["ReleaseDate"];
    }
    if (json["Release"] is int) {
      release = json["Release"];
    }
    if (json["TransferredFrom"] is String) {
      transferredFrom = json["TransferredFrom"];
    }
    if (json["PageViewNum"] is int) {
      pageViewNum = json["PageViewNum"];
    }
    if (json["NewsImgUrl"] is String) {
      newsImgUrl = json["NewsImgUrl"];
    }
    if (json["IsTop"] is int) {
      isTop = json["IsTop"];
    }
    if (json["TypeCode"] is String) {
      typeCode = json["TypeCode"];
    }
    if (json["Area"] is String) {
      area = json["Area"];
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["ID"] = id;
    _data["NewsTitle"] = newsTitle;
    _data["Sketch"] = sketch;
    _data["ReleaseDate"] = releaseDate;
    _data["Release"] = release;
    _data["TransferredFrom"] = transferredFrom;
    _data["PageViewNum"] = pageViewNum;
    _data["NewsImgUrl"] = newsImgUrl;
    _data["IsTop"] = isTop;
    _data["TypeCode"] = typeCode;
    _data["Area"] = area;
    return _data;
  }
}
